home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / margindialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-06-30  |  3.4 KB  |  126 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef MARGINDIALOG_H
  8. #define MARGINDIALOG_H
  9.  
  10. #include "scribusapi.h"
  11. #include <QDialog>
  12.  
  13. class QGroupBox;
  14. class QLabel;
  15. class QPushbutton;
  16. class QComboBox;
  17. class QCheckBox;
  18. class QLabel;
  19. class QGridLayout;
  20. class QHBoxLayout;
  21. class QVBoxLayout;
  22. class ScrSpinBox;
  23. class MarginWidget;
  24. class ScribusDoc;
  25.  
  26. /*! \brief A dialog to setup the existing document margins.
  27. In modal mode called from void ScribusMainWindow::changePageMargins() */
  28. class SCRIBUS_API MarginDialog : public QDialog
  29. {
  30.     Q_OBJECT
  31.  
  32. public:
  33.     /*! \brief GUI setup
  34.     \param parent Scribus main window in this case
  35.     \param doc current document */
  36.     MarginDialog( QWidget* parent,  ScribusDoc* doc);
  37.     ~MarginDialog() {};
  38.  
  39.     /*! \brief Returns recomputed "Links" index/value for facing pages.
  40.     \retval int 0 for max item, 1 for min. item++ for middle. Why? */
  41.     int pageOrder();
  42.     /*! \brief Current value of orientationQComboBox.
  43.     \retval int index of combobox */
  44.     int getPageOrientation();
  45.     /*! \brief Selected page width
  46.     \retval double X */
  47.     double getPageWidth();
  48.     /*! \brief Selected page height
  49.     \retval double Y */
  50.     double getPageHeight();
  51.     /*! \brief Bool value of moveObjects "property"
  52.     \retval bool true for moving */
  53.     bool getMoveObjects();
  54.     /*! \brief Returns prefsPageSizeName value
  55.     \retval QString prefsPageSizeName property */
  56.     QString getpPrefsPageSizeName();
  57.     /*! \brief Top Margin
  58.     \retval double margin size */
  59.     double top();
  60.     /*! \brief Bottom Margin
  61.     \retval double margin size */
  62.     double bottom();
  63.     /*! \brief Left Margin
  64.     \retval double margin size */
  65.     double left();
  66.     /*! \brief Right Margin
  67.     \retval double margin size */
  68.     double right();
  69.     /*! \brief Master Page
  70.     \retval QString Master Page Name */
  71.     QString masterPage();
  72.     int getMarginPreset();
  73.  
  74. public slots:
  75.     //! \brief as setOrien for orientationQComboBox current item
  76.     virtual void setPageSize();
  77.     /*! \brief Sets page size and enables/disables size widgets.
  78.     \param gr A QString with name of the page size or "Custom" */
  79.     virtual void setSize(const QString & gr);
  80.     /*! \brief Sets page orientation and sizes regarding the given value
  81.     \param  ori integer from orientationQComboBox item index */
  82.     virtual void setOrien(int ori);
  83.     /*! \brief Recompute the page width for current unit.
  84.     It's called from width spinbox.
  85.     \param v new width */
  86.     virtual void setPageWidth(double v);
  87.     /*! \brief Recompute the page height for current unit.
  88.     It's called from width spinbox.
  89.     \param v new height */
  90.     virtual void setPageHeight(double v);
  91.  
  92. private:
  93.     MarginWidget* GroupRand;
  94.     QGroupBox* dsGroupBox7;
  95.     QGroupBox* groupMaster;
  96.     QLabel* masterPageLabel;
  97.     QComboBox* masterPageComboBox;
  98.     ScrSpinBox* widthSpinBox;
  99.     ScrSpinBox* heightSpinBox;
  100.     QLabel* widthQLabel;
  101.     QLabel* heightQLabel;
  102.     QLabel* TextLabel1;
  103.     QLabel* TextLabel2;
  104.     QComboBox* sizeQComboBox;
  105.     QComboBox* orientationQComboBox;
  106.     QComboBox* Links;
  107.     QLabel* TextLabel3;
  108.     QCheckBox* moveObjects;
  109.     QPushButton* cancelButton;
  110.     QPushButton* okButton;
  111.     double unitRatio;
  112.     double pageWidth;
  113.     double pageHeight;
  114.     //! \brief Old orientation. Before it's changed via combobox.
  115.     int oldOri;
  116.     QString prefsPageSizeName;
  117.     QGridLayout* dsGroupBox7Layout;
  118.     QVBoxLayout* dialogLayout;
  119.     QHBoxLayout* okCancelLayout;
  120.     QHBoxLayout* masterLayout;
  121.  
  122.  
  123. };
  124.  
  125. #endif
  126.